/**
 *
 */
package org.geoserver.jtilecache.tile;

import java.awt.image.RenderedImage;
import java.io.InputStream;
import java.io.Serializable;
import java.io.IOException;
import java.io.OutputStream;
import javax.imageio.ImageIO;

import org.geoserver.jtilecache.mime.ImageMimeType;

/**
 * Facilitates use with JCS
 * 
 * @author Arne Kepp, The Open Planning Project
 */
public class RawTile implements Serializable {

	/**
	 * @serial
	 */
	private static final long serialVersionUID = -5171595780192211809L;

	// Store the image  in memory
	private byte[] data = null;

	public RawTile() {
		// empty
	}
	
	public RawTile(byte[] data) {
		this.data = data;
	}

	public byte[] getData() {
		return this.data;
	}
	
	public void write(OutputStream out) throws IOException {
		out.write(data);
	}
}
